The present invention relates generally to operating systems used in modern day computing environments and more specifically to a network architecture and related methods for permitting one or more user processes to access a single network process. The invention has practical application in operating environments wherein multiple user processes need access to device driver software through a single network process.
Within networked environments, it is often desired and necessary to share access to the network interface among many user processes. Typically, the network topology incorporates a mechanism for allocating network resources amongst all processes while at the same time assuring that multiple user access to those resources is handled efficiently and in a structured manner. Operating systems offering robust time and space partitioning are one example of such a network topology.
In general terms, space partitioning means that the software executing on one process cannot affect the operation of another process. Thus, space partitioning can be defined at the process level. A process, in turn, is comprised of multiple threads each of which has its own context.
For example, the context for a particular thread may contain the instruction pointer to a software instruction currently in execution. The operating system can then switch to a second thread in the process without losing its point of execution in the first thread. Although, the contents of the CPU registers changes from the context of the executing thread to the context of the second thread, the overall integrity of the process is maintained.
In contrast, within a single process one thread can affect the operation of another thread. Thus, if two threads are within the same process they can affect each other since they are within the space partitioning boundary of the process. Likewise, any thread running in first process cannot be affected by a thread in a second process.
The problem inherent to operating systems employing space and time partitioning is that access to the network processes is oftentimes very rigidly defined. A uniform method of communicating with external devices on the network within the context of multiple users processes attempting to access a single network process has not, has not until the present invention, been achieved. Preferably, all threads in the user process would have access to the network interface employed by the operating system.
According to one aspect of the invention, disclosed are a set of functions and operations which may be employed in an application to provide access by multiple user processes to a single network process. The invention has practical application within the context of an operating system that provides for multiple processes and multiple threads within a process such as a space and time partitioning operating system. An example application would be in the aviation industry where certification is expensive due to the increasing complexity of modern avionics control systems.
Also disclosed is a software means for allowing any user process to access a single network process. The network process contains the device driver software for a plurality of network devices and components which a user may wish to access. The socket library provides the interface mechanism to the network process and can be created as a static or dynamically linked library.
In operation, all user processes access a singular network process by calling a function in the socket library.
The user process can be based on an Application Programmer Interface (API) socket model as implemented by the Berkeley software distribution or the Windows Socket Implementation model.
The socket library communicates with the network process. The socket library formats a message containing all the information necessary for the network process to fulfill the intent of the API call. The message may also include any required data. The socket library then sends the message to the network process.
Once the network process receives the message, it performs whatever activity is necessary to fulfill the intent of the API call.
The network process sends a message to the user process that placed the call containing a return value and any related data. The socket library receives the message on behalf of the user process and, in turn, transmits to the user process the return value and any data received from the network process.
In one embodiment, the socket library and network process communicate using a mailbox. A mailbox is a method of communicating between processes. Mailboxes are aperiodic so that information can be transmitted at any time. Thus, the invention utilizes point to point communications so that a message is sent to a specific mailbox which is owned by a specific process and the sending process must have been granted access by the receiving process to send that message. Otherwise the send will fail.
A technical advantage of the present invention is that access to the network interface is established and relinquished dynamically.
Another technical advantage of the present invention is that balance between performance and resource utilization is easily adjusted.
Still another advantage of the present invention is that the number of threads that can access the network interface is easily adjusted.